<template>
  <div class="app-container">
      <ViewHteFilePolicy v-if="parentId == 2" :parentId="parentId" :fileId="fileId" :version="version"   />
    <view-hte-file-standard v-else :parentId="parentId" :fileId="fileId" :version="version" :projectNo="projectNo" />
  </div>
</template>

<script>

import { getAction, postAction } from '@/api/manage'

import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import ViewHteFileStandard from './ViewHteFileStandard.vue';
import ViewHteFilePolicy from './ViewHteFilePolicy.vue';
import { getParamValFromUrl, strNotNull } from '@/utils/common.js'
export default {
  components: {
    ViewHteFileStandard,
    ViewHteFilePolicy
  },
   mounted() {
    let version = this.$route.params && this.$route.params.v
    if(version.indexOf("&")>0){
      version = version.substr(0,version.indexOf('&'))
    }
    this.version = Number(version)
  },

  data() {
    return {
      parentId: Number(this.$route.params && this.$route.params.c),
      fileId: Number(this.$route.params && this.$route.params.id),
      version: null,
      projectNo:getParamValFromUrl("projectNo")
    };
  },
  methods: {}
}
</script>

<style scoped>
  #app{
    background-color: #f5f5f5!important;
  }
.app-container {
  position: relative;
  background-color: #f5f5f5;
  width: 100%;
  min-width: 1200px;
  height: 100%;
  justify-content: center;
  padding-top: 30px;
      padding-bottom: 0px;
}
.botton-bar {
  position: fixed;
  bottom: 0;
  z-index: 9;
  width:calc(100% - 194px);
}
.app-box {
  width:calc(100% - 194px);
  height:100%;
  min-width: 1200px;
  margin:0 auto;
  position: relative;
}
.fixed-menu {
  position: absolute;
  top:48px;
  right: 0vw;
  z-index: 10000;
  width:80px;
  right: -95px;
 
}
 .fixed-menu span{
  font-size: 12px;
  }
.functionMould {
  background-color: #ffffff;
  height: 80px;
  padding-top: 18px;
  text-align: center;
  margin-bottom: 10px;
  cursor: pointer;
}
.functionMould > span {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: #000000;
  display: block;
}
.menu-icon {
  font-size: 24px;
  color: #31a0e1;
}
.ant-menu-item {
  border: 1px solid #31a0e13d !important;
  padding: 0 0px;
  /*width: 20%;*/
  text-align: center;
}
.ant-menu-item-selected {
  color: #ffffff !important;
  background: #31a0e1 !important;
}
</style>

<style scoped lang="less">

 /deep/ .app-box .ant-card{
      height: calc(100% - 68px );
    overflow-y: auto;
}
 /deep/ .app-box .ant-card .ant-card-body{
      height: 100%;
    
}
</style>